
[%
metamodel http://www.eclipse.org/uml2/2.0.0/UML

import org.acceleo.modules.uml2.services.Uml2Services
import org.acceleo.modules.uml2.services.StringServices
%]

[%script type="Class" name="fullFilePath"%]
[%if (hasStereotype("Entity")){%]
/[%package.name%]/[%name%]View.jsp
[%}%]

[%script type="Class" name="generate" file="[%fullFilePath%]"%]
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="via" uri="http://taam.org/taglib" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>[%ownedComment.body%]</title>
	</head>
	<body>


<a href="<%= application.getContextPath() %>/index.html">Index</a> -
<a href="[%name%]Form.jsp">Controle sur les objets</a>
<br/>
<br/>
<br/>This is an example of use of the tag "[%name%]ViewTag" generated by org.taam.taglib.ViewTag.mt.
<br/><br/>
It creates for each entity object from the model a tag which display all the instances of the entity from the database.  
<br/>
<br/>
Here the code used in this JSP:

<p>
<textarea  readonly="readonly" cols="100" rows="10">
&lt;%@ taglib prefix="via" uri="http://taam.org/taglib" %&gt;
&lt;via:[%name%]ViewTag&gt
[%for (attribute){%]
[%if (type.filter("PrimitiveType") != null){%]
	&lt;p&gt;&lt;u&gt; [%name.firstLower()%]:&lt;/u&gt \${[%name.firstLower()%]}&lt;/p&gt;
[%}%][%}%]
	&lt;hr/&gt
&lt/via:[%name%]ViewTag&gt;
&lt;p&gt\${endMessage}&lt/p&gt</textarea>
</p>
<br/><br/>
You can copy and customize it for use in your web application.


Here the result of this code :


<hr/>




<via:[%name%]ViewTag>
[%for (attribute){%]
				[%if (type.filter("PrimitiveType") != null){%]
				
				<p><u>[%name.firstLower()%]:</u> ${[%name.firstLower()%]}</p>
			[%}%]				
		[%}%]
<hr/>
</via:[%name%]ViewTag>
<p>${endMessage}</p>
			

<br/><br/>
<hr/>
This page is generated by the acceleo script org.taam.JSPs.jspView.mt.

</body>